for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
export default class ValidationError extends Error {
constructor(cottus, errors) {
super();
this.cottus = cottus;
this.errors = errors;
}
toJSON() {
return {
code : 'VALIDATION_ERROR',
details : this.errors.map(e => e.hash)
};